set(MODULE communications)

# find_package(MbedTLS)
# find_package(OpenSSL)
# find_package(jsoncpp)

# message("mbedtls: ${MbedTLS_DIR}, ${OpenSSL_INCLUDES}, ${jsoncpp_LIBS}")

include_directories(./
        )
aux_source_directory(./ SRC)
aux_source_directory(udp SRC)
aux_source_directory(http SRC)
aux_source_directory(tcp SRC)
aux_source_directory(tls_tcp SRC)
add_library(${MODULE} ${SRC})

target_link_directories(${MODULE} PUBLIC
    ${OPENSSL_LIBS_DIR}
    ${MBEDTLS_LIBS_DIR}
    ${JSONCPP_LIBS_DIR})
target_link_libraries(${MODULE} jsoncpp settings ssl crypto mbedtls mbedx509 mbedcrypto)
target_include_directories(${MODULE} PUBLIC ${JSONCPP_INCLUDE_DIR}
    ${OPENSSL_INCLUDE_DIR}
    ${MBEDTLS_INCLUDE_DIR}
    ${PRODUCT_ROOT_DIR}/foundation/webconfig)